﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MathTest {
    class FirstClass {
        public const double PI = 3.14159265;


        public static void getCircleArea() {
            Console.Write("输入半径r:");
            double r = Double.Parse(Console.ReadLine());
            Console.WriteLine("圆的面积为" + (r * r) * PI);
        }


        public static void consoleWithRule() {
            Console.WriteLine("输入三个值：");
            double number1 = Double.Parse(Console.ReadLine());
            double number2 = Double.Parse(Console.ReadLine());
            double number3 = Double.Parse(Console.ReadLine());

            Console.WriteLine("{0,10:f3}", number1);
            Console.WriteLine("{0,10:f3}", number2);
            Console.WriteLine("{0,10:f3}", number3);
        }

        public static void getMathResult() {

            double a = 8;
            double b = 5;
            double c = 9;
            double x = 2.5;

            double y = ((a * (x * x)) + (b * x) - c);

            Console.WriteLine("公式公式y=ax~2+bx-c的结果为：" + y);

        }


        public static void getRuleTime() {

            Console.WriteLine("输入秒数：");
            int number = int.Parse(Console.ReadLine());
            int hour = number / (60 * 60);
            int minute = (number % (60 * 60)) / 60;
            int second = (number - (hour * 3600) - (minute * 60));

            Console.WriteLine("时间是" + hour + "小时" + minute + "分" +
               second + "秒");

        }
    }
}
